import request from '@/utils/request'
export function enterStorage(params) {
  return request({
    url: '/api/back/stores/in',
    method: 'post',
    params
  })
}
export function outStorage(params) {
  return request({
    url: '/api/back/stores/out',
    method: 'post',
    params
  })
}
export function deleteItem(userId) {
  return request({
    url: '/api/back/parts/' + userId,
    method: 'delete'
  })
}
export function searchResult(params) {
  return request({
    url: '/api/back/parts',
    method: 'get',
    params
  })
}
export function exportResult() {
  return request({
    url: '/api/back/parts/export',
    method: 'get',
    responseType: 'blob',
    headers: {
      'Content-Type': 'application/json; application/octet-stream'
    }
  })
}
export function exportAdmin() {
  return request({
    url: '/api/back/users/export',
    method: 'get',
    responseType: 'blob',
    headers: {
      'Content-Type': 'application/json; application/octet-stream'
    }
  })
}
export function createDiscount(params) {
  return request({
    url: '/api/back/users/discount',
    method: 'post',
    params
  })
}
export function searchPart_id(params) {
  return request({
    url: '/api/back/parts',
    method: 'get',
    params
  })
}